﻿using WebMsg;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Text;

namespace WebMsg.Tests
{
    
    
    /// <summary>
    ///This is a test class for SmsTest and is intended
    ///to contain all SmsTest Unit Tests
    ///</summary>
    [TestClass()]
    public class SmsTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for To
        ///</summary>
        [TestMethod()]
        [DeploymentItem("WebMsg.dll")]
        public void ToTest()
        {
            PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            Sms_Accessor target = new Sms_Accessor(param0); // TODO: Initialize to an appropriate value
            TelAddress expected = null; // TODO: Initialize to an appropriate value
            TelAddress actual;
            target.To = expected;
            actual = target.To;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Segments
        ///</summary>
        [TestMethod()]
        public void SegmentsTest()
        {
            TelAddress to = null; // TODO: Initialize to an appropriate value
            string body = string.Empty; // TODO: Initialize to an appropriate value
            Sms target = new Sms(to, body); // TODO: Initialize to an appropriate value
            int actual;
            actual = target.Segments;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for LongMessage
        ///</summary>
        [TestMethod()]
        public void LongMessageTest()
        {
            TelAddress to = new TelAddress("MrSmith", "0419198795");
            StringBuilder strb = new StringBuilder();
            
            for (int i = 0; i < (Sms.LEN_STD + 1); i++)
                strb.Append("a");

            Sms target = new Sms(to, strb.ToString());
            int actual;
            actual = target.LongMessage;
            Assert.IsTrue(1 == actual);
        }

        /// <summary>
        ///A test for From
        ///</summary>
        [TestMethod()]
        [DeploymentItem("WebMsg.dll")]
        public void FromTest()
        {
            PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            Sms_Accessor target = new Sms_Accessor(param0); // TODO: Initialize to an appropriate value
            TelAddress expected = null; // TODO: Initialize to an appropriate value
            TelAddress actual;
            target.From = expected;
            actual = target.From;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Body
        ///</summary>
        [TestMethod()]
        [DeploymentItem("WebMsg.dll")]
        public void BodyTest()
        {
            PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            Sms_Accessor target = new Sms_Accessor(param0); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            target.Body = expected;
            actual = target.Body;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Sms Constructor
        ///</summary>
        [TestMethod()]
        public void SmsConstructorTest()
        {
            TelAddress from = null; // TODO: Initialize to an appropriate value
            TelAddress to = null; // TODO: Initialize to an appropriate value
            string body = string.Empty; // TODO: Initialize to an appropriate value
            Sms target = new Sms(from, to, body);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Sms Constructor
        ///</summary>
        [TestMethod()]
        public void SmsConstructorTest1()
        {
            TelAddress to = null; // TODO: Initialize to an appropriate value
            string body = string.Empty; // TODO: Initialize to an appropriate value
            Sms target = new Sms(to, body);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
